<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /* Person name,age  sayName */
        class Person {
            constructor(name, age) {
                this.name = name;
                this.age = age;
            }
            sayName() {
                console.log(this.name)
            }
        }
        var p = new Person("李四", 20);
        /* Student name,age,skill sayName */
        class Student {
            constructor(name, age, skill) {
                this.name = name;
                this.age = age;
                this.skill = skill;
            }
            sayName() {
                console.log(this.name)
            }
        }
    </script>
</body>

</html>